package de.hauschild.gmltracer.gml.impl.value;

import de.hauschild.gmltracer.gml.impl.AbstractToken;

/**
 * The abstract extension of {@link AbstractToken} providing functionality to store
 * a value.
 * 
 * @param <T>
 *          the type of the value
 * 
 * @author Klaus Hauschild
 * @since 1.0.0
 */
public abstract class ValueToken<T> extends AbstractToken {

  private T value;

  /**
   * Gets the value.
   * 
   * @return the value
   */
  public T getValue() {
    return value;
  }

  @Override
  public String toString() {
    return value.toString();
  }

  protected void setValue(final T theValue) {
    value = theValue;
  }
}
